2 # x1'' = -k1*x1 + k*(x2-x1)
3 # x2'' = -k2*x2 - k*(x2-x1)
4 # xi are the displacement of the pendulum to its resting position
9 coefficient.5(-1) -> -x10 # initial displacement x1
10 coefficient.6(-1) -> -x20 # initial displacement x2
12 iintegrate x1'' -> -x1'
16 iintegrate x2'' -> -x2'
20 cmultiply x1, k1 -> k1*x1
21 cmultiply x2, k2 -> k2*x2
24 isum x2, -x1 -> -(x2-x1)
25 cmultiply -(x2-x1), k -> -k*(x2-x1)
27 isum k1*x1, -k*(x2-x1) -> -k1*x1+k*(x2-x1)
28 assign -k1*x1+k*(x2-x1) -> x1''
29 invert -k*(x2-x1) -> k*(x2-x1)
30 isum k2*x2, k*(x2-x1) -> -k2*x2-k*(x2-x1)
31 assign -k2*x2-k*(x2-x1) -> x2''